<!DOCTYPE html>
<html lang='en'>
    <head>
        <title>绚试™ MTM管理系统(服装行业量身定制)</title>
        {include file="public/meta" /}
        <link href="/static/assets/stylesheets/plugins/fileinput/bootstrap-fileinput.css" rel="stylesheet" type="text/css" media="all" />
        <link href="/static/assets/stylesheets/plugins/fileupload/jquery.fileupload-ui.css" rel="stylesheet" type="text/css" media="all" />
        <link href="/static/assets/stylesheets/plugins/fileupload/blueimp-gallery.min.css" rel="stylesheet" type="text/css" media="all" />        
    </head>
    <body class='contrast-red'>
        {include file="public/header" /}
        <div id='wrapper'>
            <div id='main-nav-bg'></div>
            <nav id='main-nav'>
                <div class='navigation'>
                    {:action('ShowMenu/index',['id' => '1'],'widget')}
                </div>
            </nav>
            <section id='content'>
                <div class='container'>
                    {__CONTENT__}
                    {include file="public/footer" /}    
            </section>
        </div>
        <!-- / jquery [required] -->
        {include file="public/bottomjs" /}
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.ui.widget.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/tmpl.min.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/load-image.all.min.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/canvas-to-blob.min.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.blueimp-gallery.min.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.iframe-transport.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-process.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-image.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-audio.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-video.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-validate.js" type="text/javascript"></script>
        <script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-ui.js" type="text/javascript"></script>        
        <script>
            var u = $(".active").parent('ul');
            var uc = u.attr("class");//
            if (uc == 'nav nav-stacked') {
                u.prev().attr("class", "dropdown-collapse in");
                u.show();
            }

        </script>
        <script>
            $(function () {
                'use strict';
                $('#fileupload').fileupload({
                    url: '__URL__/mupload'
                });
                $('#fileupload').fileupload(
                        'option',
                        'redirect',
                        window.location.href.replace(
                                /\/[^\/]*$/,
                                '/cors/result.html?%s'
                                )
                        );
                $('#fileupload').fileupload('option', {
                    url: '__URL__/mupload',
                    disableImageResize: /Android(?!.*Chrome)|Opera/
                            .test(window.navigator.userAgent),
                    maxFileSize: 10000000,
                    maxNumberOfFiles: {$amount},
                    acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
                    messages: {
                        maxNumberOfFiles: '对不起上传文件超出数量！',
                    }
                });
                if ($.support.cors) {
                    $.ajax({
                        url: '__URL__/mupload',
                        type: 'HEAD'
                    }).fail(function () {
                        $('<div class="alert alert-danger"/>')
                                .text('Upload server currently unavailable - ' +
                                        new Date())
                                .appendTo('#fileupload');
                    });
                }

            });
        </script>
    </body>
</html>